package two_xia.ex6.test02;

class Adapter implements Cat, Dog {
    private Cat cat;
    private Dog dog;

    public Adapter(Cat cat) {
        this.cat = cat;
    }

    public Adapter(Dog dog) {
        this.dog = dog;
    }

    public void cry() {
        cat.play();
    }

    public void play() {
        dog.cry();
    }

}